/*
 * @: 
 * @version: 1.0
 * @Author: ziwei
 * @Date: 2021-11-02 00:26:33
 * @LastEditors: ziwei
 * @LastEditTime: 2021-11-15 22:43:55
 */
import React,{Component} from 'react'
import {connect} from 'react-redux'
import actions from '../store/actions'
class Counter extends Component{
    render(){
      let {number,asyncAdd,stopAdd} = this.props
        return(
            <div>
              <p>{number}</p>
              <button onClick={asyncAdd}>asyncAdd</button>
              <button onClick={stopAdd}>stopAdd</button>
            </div>
        )
    }
}

//state 映射 没有合并reducer所以是总状态
export default connect(state=>state,actions)(Counter)